package com.Pojo;

import java.time.LocalDateTime;

public class NginxLog {


    private LocalDateTime time_iso8601;  // 访问日期
    private String remote_addr; //客户端IP
    private String remote_user; //当nginx开启了用户认证，此变量记录客户端使用的账号
    private String request; // 记录了当前http请求的方法，url和http协议版本
    private String status; // 状态码
    private String body_bytes_sent; // 记录nginx响应客户端请求时，发生到客户端的字节数，不包含响应头大小
    private String http_referer ; // 记录了当前的请求是从哪个页面过来的
    private String connection; // 获取使用的TCP连接信息
    private String upstream_addr; // 指负载均衡池的哪个服务器处理此请求
    private String http_user_agent; // 记录了客户端的软件信息，比如，浏览器的名称和版本号
    private String http_x_forwarded_for; //
    private String uri; // 获取请求URL的路径部分
    private String http_host; // 请求地址，即浏览器中输入的地址（IP或域名）
    private String request_time; // 处理请求的总时间，包含了用户数据接收时间
    private String upstream_response_time; //建立连接和从上游服务器接收响应主体的最后一个字节之间的时间
    private String upstream_connect_time; // 花费在与上游服务器建立连接的时间
    private String upstream_header_time; // 建立连接和从上游服务器接收响应头的第一个字节之间的时间
    private String agent_ip; //filebeat的代理IP，也就是在哪台服务器采集日志

    public NginxLog() {
    }

    public NginxLog(LocalDateTime time_iso8601, String remote_addr, String remote_user, String request, String status, String body_bytes_sent, String http_referer, String connection, String upstream_addr, String http_user_agent, String http_x_forwarded_for, String uri, String http_host, String request_time, String upstream_response_time, String upstream_connect_time, String upstream_header_time, String agent_ip) {
        this.time_iso8601 = time_iso8601;
        this.remote_addr = remote_addr;
        this.remote_user = remote_user;
        this.request = request;
        this.status = status;
        this.body_bytes_sent = body_bytes_sent;
        this.http_referer = http_referer;
        this.connection = connection;
        this.upstream_addr = upstream_addr;
        this.http_user_agent = http_user_agent;
        this.http_x_forwarded_for = http_x_forwarded_for;
        this.uri = uri;
        this.http_host = http_host;
        this.request_time = request_time;
        this.upstream_response_time = upstream_response_time;
        this.upstream_connect_time = upstream_connect_time;
        this.upstream_header_time = upstream_header_time;
        this.agent_ip = agent_ip;
    }

    public String getAgent_ip() {
        return agent_ip;
    }

    public void setAgent_ip(String agent_ip) {
        this.agent_ip = agent_ip;
    }

    public LocalDateTime getTime_iso8601() {
        return time_iso8601;
    }

    public void setTime_iso8601(LocalDateTime time_iso8601) {
        this.time_iso8601 = time_iso8601;
    }

    public String getRemote_addr() {
        return remote_addr;
    }

    public void setRemote_addr(String remote_addr) {
        this.remote_addr = remote_addr;
    }

    public String getRemote_user() {
        return remote_user;
    }

    public void setRemote_user(String remote_user) {
        this.remote_user = remote_user;
    }

    public String getRequest() {
        return request;
    }

    public void setRequest(String request) {
        this.request = request;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getBody_bytes_sent() {
        return body_bytes_sent;
    }

    public void setBody_bytes_sent(String body_bytes_sent) {
        this.body_bytes_sent = body_bytes_sent;
    }

    public String getHttp_referer() {
        return http_referer;
    }

    public void setHttp_referer(String http_referer) {
        this.http_referer = http_referer;
    }

    public String getConnection() {
        return connection;
    }

    public void setConnection(String connection) {
        this.connection = connection;
    }

    public String getUpstream_addr() {
        return upstream_addr;
    }

    public void setUpstream_addr(String upstream_addr) {
        this.upstream_addr = upstream_addr;
    }

    public String getHttp_user_agent() {
        return http_user_agent;
    }

    public void setHttp_user_agent(String http_user_agent) {
        this.http_user_agent = http_user_agent;
    }

    public String getHttp_x_forwarded_for() {
        return http_x_forwarded_for;
    }

    public void setHttp_x_forwarded_for(String http_x_forwarded_for) {
        this.http_x_forwarded_for = http_x_forwarded_for;
    }


    public String getUri() {
        return uri;
    }

    public void setUri(String uri) {
        this.uri = uri;
    }

    public String getHttp_host() {
        return http_host;
    }

    public void setHttp_host(String http_host) {
        this.http_host = http_host;
    }

    public String getRequest_time() {
        return request_time;
    }

    public void setRequest_time(String request_time) {
        this.request_time = request_time;
    }

    public String getUpstream_response_time() {
        return upstream_response_time;
    }

    public void setUpstream_response_time(String upstream_response_time) {
        this.upstream_response_time = upstream_response_time;
    }

    public String getUpstream_connect_time() {
        return upstream_connect_time;
    }

    public void setUpstream_connect_time(String upstream_connect_time) {
        this.upstream_connect_time = upstream_connect_time;
    }

    public String getUpstream_header_time() {
        return upstream_header_time;
    }

    public void setUpstream_header_time(String upstream_header_time) {
        this.upstream_header_time = upstream_header_time;
    }

    @Override
    public String toString() {
        return "NginxLog{" +
                "time_iso8601=" + time_iso8601 +
                ", remote_addr='" + remote_addr + '\'' +
                ", remote_user='" + remote_user + '\'' +
                ", request='" + request + '\'' +
                ", status='" + status + '\'' +
                ", body_bytes_sent='" + body_bytes_sent + '\'' +
                ", http_referer='" + http_referer + '\'' +
                ", connection='" + connection + '\'' +
                ", upstream_addr='" + upstream_addr + '\'' +
                ", http_user_agent='" + http_user_agent + '\'' +
                ", http_x_forwarded_for='" + http_x_forwarded_for + '\'' +
                ", uri='" + uri + '\'' +
                ", http_host='" + http_host + '\'' +
                ", request_time='" + request_time + '\'' +
                ", upstream_response_time='" + upstream_response_time + '\'' +
                ", upstream_connect_time='" + upstream_connect_time + '\'' +
                ", upstream_header_time='" + upstream_header_time + '\'' +
                ", agent_ip='" + agent_ip + '\'' +
                '}';
    }
}
